package com.resou.reader.api.entry;

import android.os.Parcel;
import android.os.Parcelable;

import org.litepal.crud.LitePalSupport;

public class ChapterItemBean extends LitePalSupport implements Parcelable {

    /**
     * syncTime : 1533048803000
     * isPay : 0
     * channel : 17k
     * chapterName : 第001章：蹊跷退伍
     * platformId : 1399680
     * isVip : 0
     * tomeName : 第一卷：初露锋芒
     * tomeId : 5822103
     * sortNo : 1
     * novelId : 2164
     * chapterId : 21566367
     * wordNum : 2232
     * id : 489355
     * createTimeStr : 2018-08-08 10:04:47
     * status : 1
     * updateTimeStr : 2015-09-16 00:51:47
     */
    private String isPay;
    private String chapterName;
    private String isVip;
    private String chapterId;
    private String zsChapterLink;
    //自己加的字段
    private int id;
    private boolean isCached;
    private int chapterSum;
    private int chapterIndex;
    private String bookName;
    private String shareUrl;
    private String bookId;
    private String zsBookId;
    private String zsChapterIdSuffix;
    private String bookPic;
    private String isVipUser;

    public ChapterItemBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBookPic() {
        return bookPic;
    }

    public void setBookPic(String bookPic) {
        this.bookPic = bookPic;
    }

    public String getZsChapterLink() {
        return zsChapterLink;
    }

    public void setZsChapterLink(String zsChapterLink) {
        this.zsChapterLink = zsChapterLink;
    }

    public String getZsBookId() {
        return zsBookId;
    }

    public void setZsBookId(String zsBookId) {
        this.zsBookId = zsBookId;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public static Creator<ChapterItemBean> getCREATOR() {
        return CREATOR;
    }

    private String description;

    public String getIsPay() {
        return isPay;
    }

    public void setIsPay(String isPay) {
        this.isPay = isPay;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public String getIsVip() {
        return isVip;
    }

    public void setIsVip(String isVip) {
        this.isVip = isVip;
    }

    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }

    public boolean isCached() {
        return isCached;
    }

    public void setCached(boolean cached) {
        isCached = cached;
    }

    public int getChapterSum() {
        return chapterSum;
    }

    public void setChapterSum(int chapterSum) {
        this.chapterSum = chapterSum;
    }

    public int getChapterIndex() {
        return chapterIndex;
    }

    public void setChapterIndex(int chapterIndex) {
        this.chapterIndex = chapterIndex;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getShareUrl() {
        return shareUrl;
    }

    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getZsChapterIdSuffix() {
        return zsChapterIdSuffix;
    }

    public String getIsVipUser() {
        return isVipUser;
    }

    public void setIsVipUser(String isVipUser) {
        this.isVipUser = isVipUser;
    }

    public void setZsChapterIdSuffix(String zsChapterIdSuffix) {
        this.zsChapterIdSuffix = zsChapterIdSuffix;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.isPay);
        dest.writeString(this.chapterName);
        dest.writeString(this.isVip);
        dest.writeString(this.chapterId);
        dest.writeString(this.zsChapterLink);
        dest.writeByte(this.isCached ? (byte) 1 : (byte) 0);
        dest.writeInt(this.chapterSum);
        dest.writeInt(this.chapterIndex);
        dest.writeString(this.bookName);
        dest.writeString(this.shareUrl);
        dest.writeString(this.bookId);
        dest.writeString(this.zsBookId);
        dest.writeString(this.zsChapterIdSuffix);
        dest.writeString(this.description);
        dest.writeString(this.bookPic);
        dest.writeString(this.isVipUser);
    }

    protected ChapterItemBean(Parcel in) {
        this.id = in.readInt();
        this.isPay = in.readString();
        this.chapterName = in.readString();
        this.isVip = in.readString();
        this.chapterId = in.readString();
        this.zsChapterLink = in.readString();
        this.isCached = in.readByte() != 0;
        this.chapterSum = in.readInt();
        this.chapterIndex = in.readInt();
        this.bookName = in.readString();
        this.shareUrl = in.readString();
        this.bookId = in.readString();
        this.zsBookId = in.readString();
        this.zsChapterIdSuffix = in.readString();
        this.description = in.readString();
        this.bookPic = in.readString();
        this.isVipUser = in.readString();
    }

    public static final Creator<ChapterItemBean> CREATOR = new Creator<ChapterItemBean>() {
        @Override
        public ChapterItemBean createFromParcel(Parcel source) {
            return new ChapterItemBean(source);
        }

        @Override
        public ChapterItemBean[] newArray(int size) {
            return new ChapterItemBean[size];
        }
    };


}
